<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/evaluation',
    'namespace' => 'Frieza\\Modules\\Evaluation\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    // 列表
    $router->get('/list', 'EvaluationController@list');
    // 新建
    $router->get('/list/create', 'EvaluationController@edit');
    // 更新状态
    $router->put('/list/{id}','EvaluationController@updateStatus');
    // 下载文档
    $router->get('/list/down/{id}', 'EvaluationController@downExcel');
    // 编辑
    $router->get('/list/{id}/edit', 'EvaluationController@edit');
    // 编辑获奖人员
    $router->get('/list/{id}/edit/create', 'EvaluationController@editApplyUser');
    // 保存获奖人员信息
    $router->post('/list/applyuser/add/{evaluation_id}', 'EvaluationController@addApplyUser');
    // 保存基本信息
    $router->post('/list/save', 'EvaluationController@listSave');
    // 发布测评文章
    $router->put('/list/{evaluation_id}/edit/{id}','EvaluationController@reportPublishStatus');
    
    // 删除申请表单人员
    $router->delete('/list/{id}/edit/{uid}', 'EvaluationController@delApplyUser');

    $router->get('/show', 'EvaluationController@show');
    // 公布获奖名单
    $router->get('/list/{id}/publishList','EvaluationController@publishList');

    // 发布测评报告
    $router->put('/list/{evaluation_id}/edit/{id}','EvaluationController@reportPublish');
    // 删除
    $router->delete('/list/{id}', 'EvaluationController@delEvalution');

    //获取h5表单选项
    $router->get('/list/{id}/getOptions','EvaluationController@getOptions');
    $router->get('/list/getOptions','EvaluationController@getOptions');

    // 下载H5表单
    $router->get('/list/download/{id}', 'EvaluationController@downLoadExcel');

});
